package bavaria.hightec.conditions;

public class GiroAccountConditions extends Conditions {
	
	public static enum CreditHistory {ONE,TWO,THREE};
	private static long maxvalue;
	CreditHistory activeCreditHistory = CreditHistory.THREE;
	
	private CreditHistory getGroup(){
		if(activeCreditHistory == CreditHistory.THREE)
			activeCreditHistory = CreditHistory.ONE;
		else if(activeCreditHistory == CreditHistory.ONE)
			activeCreditHistory = CreditHistory.TWO;
		else if (activeCreditHistory == CreditHistory.TWO)
			activeCreditHistory = CreditHistory.THREE;
	return activeCreditHistory;
	}
	
	public GiroAccountConditions(){
		generateCreditHistory(getGroup());
	}
	
	private long generateCreditHistory(CreditHistory creditHistory){
		if(creditHistory==creditHistory.ONE)
			maxvalue=-10000;
		else if(creditHistory==creditHistory.TWO)
			maxvalue=-5000;
		else if(creditHistory==creditHistory.THREE)
			maxvalue=-1000;
		return maxvalue;
	}
	
	public static long getCreditHistory(CreditHistory creditHistory){
		if(creditHistory==creditHistory.ONE)
			maxvalue=-10000;
		else if(creditHistory==creditHistory.TWO)
			maxvalue=-5000;
		else if(creditHistory==creditHistory.THREE)
			maxvalue=-1000;
		return maxvalue;
	}
	
	public long getCreditHistory(){
		return maxvalue;
	}
	
			

}
